package com.yuanfeng.business.controller;

import com.yuanfeng.business.dto.ShopBaseListDTO;
import com.yuanfeng.commoms.util.ResponseResult;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

/**
 * @ClassName ShopCompanyController
 * @Description
 * @Author hyq
 * @Date 2023/7/20 14:13
 * @Version 1.0
 **/
@RestController
@RequestMapping("shop/company")
public class ShopCompanyController extends BaseController{

    /**
     * 平台审核店铺退保列表
     *
     * @param param
     * @return
     */
    @PostMapping("/platform/shopReturnBondUpdate")
    public ResponseResult updateShopReturnBond(@RequestBody ShopBaseListDTO param) {
        ResponseResult result=shopCompanyService.updateShopReturnBond(param);
        return result;
    }


    /**
     * 平台查询店铺退保列表
     *
     * @param param
     * @return
     */
    @PostMapping("/platform/shopReturnBondList")
    public ResponseResult queryShopReturnBondList(@RequestBody ShopBaseListDTO param) {
        ResponseResult result=shopCompanyService.queryShopReturnBondList(param);
        return result;
    }

    /**
     * 平台审核质保金
     *
     * @param param
     * @return
     */
    @PostMapping("/platform/shopDepositUpdate")
    public ResponseResult updateShopDeposit(@RequestBody ShopBaseListDTO param) {
        ResponseResult result=shopCompanyService.updateShopDeposit(param);
        return result;
    }

    /**
     * 平台查询质保金列表
     *
     * @param param
     * @return
     */
    @PostMapping("/platform/shopDepositList")
    public ResponseResult queryShopDepositList(@RequestBody ShopBaseListDTO param) {
        ResponseResult result=shopCompanyService.queryShopDepositList(param);
        return result;
    }

    /**
     * 删除店铺信息
     * @param map
     * @return
     */
    @PostMapping("/h5/delShopInfo")
    public ResponseResult delShopInfo(@RequestBody Map<String,String> map) {
        return shopCompanyService.delShopInfo(map);
    }
}
